﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace homework4
{
    class Program
    {
        static void Main(string[] args)
        {
            int s = 0;
            for (int i = 2; i <= 100000
                ; i++)
            {
                int m = 0;
                for (int j = 2; j <= System.Math.Sqrt(i); j++)
                    if (i % j == 0)
                    { m++; }
                if (m==0)       
                Console.WriteLine(i); 
                if(m==0)
                s++;
                 

            }

            Console.WriteLine();
            Console.WriteLine(s);
            Console.ReadKey();
         }
    }
}
